<!DOCTYPE html>
            
<HTML>
<HEAD>
<meta name="booktitle" content="Developing Applications With Objective Caml" >
 <meta charset="ISO-8859-1"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<META name="GENERATOR" content="hevea 1.05-7 of 2000-02-24">
<META NAME="Author" CONTENT="Christian.Queinnec@lip6.fr">
<LINK rel=stylesheet type="text/css" href="videoc-ocda.css">
<script language="JavaScript" src="videoc.js"><!--
//--></script>
<TITLE>
 Introduction
</TITLE>
</HEAD>
<BODY class="regularBody">
<A HREF="book-ora127.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A>
<A HREF="book-ora129.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2> Introduction</H2>Modular design and modular programming support the decomposition of a
program into several <EM>software units</EM>, also called <EM>modules</EM>,
which can be developed largely independently. A module can be
compiled separately from the other modules comprising the program. 
Consequently, the developer of a program that uses a module does not
need access to the source code of the module: the compiled code of the
module is enough for building an executable program. However, the
programmer must know the <EM>interface</EM> of the modules used, that is,
which values, functions, types, exceptions, or even sub-modules are
provided by the module, under which names, and with which types.<BR>
<BR>
Explicitly writing down the interface of a module hides the details of
its implementation from the programs that use this module. All these
programs know about the module are the names and types of exported
definitions; their exact implementations are not known. Thus, the
maintainer of the module has considerable flexibility in evolving the
module implementation: as long as the interface is unchanged and the
semantics are preserved, users of the module will not notice the
change in implementation. This can greatly facilitate the maintenance
and evolution of large programs. Like local declarations, a module
interface also supports hiding parts of the implementation that the
module designer does not wish to publicize. An important application
of this hiding mechanism is the implementation of 
abstract data types.<BR>
<BR>
Finally, advanced module systems such as that of Objective CAML support the
definition of parameterized modules, also called
generics. These are modules that take other modules as
parameters, thus increasing opportunities for code reuse.<BR>
<BR>
<HR>
<A HREF="book-ora127.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A>
<A HREF="book-ora129.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
